let path=require('path')
let CssMinimizerPlugin =require('css-minimizer-webpack-plugin')
let TerserWebpackPlugin =require('terser-webpack-plugin')
module.exports={
    mode:'production',
    output:{
        filename:'./script/[name].[contenthash:4].js',
    },
    optimization:{         //优化配置
        minimizer:[
            new CssMinimizerPlugin() ,   //开启css压缩
            new TerserWebpackPlugin()    //开启js压缩
        ]
    }
}